<template>
    <div>
        <mt-swipe :auto="4000">
            <mt-swipe-item v-for="item in lunboList" :key="item.url ">
                <img :src="item.img" style="width: 100%;height: 100%" alt="">
            </mt-swipe-item>
        </mt-swipe>
        <!--九宫格-->
        <ul class="mui-table-view mui-grid-view mui-grid-9">
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
                <router-link to="/home/newslist">
                <span class="mui-icon mui-icon-home"></span>
                <div class="mui-media-body">主页</div>
                </router-link></li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="#">
                <span class="mui-icon mui-icon-extra mui-icon-extra-filter"></span>
                <div class="mui-media-body">亚洲无码</div></a></li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="#">
                <span class="mui-icon mui-icon-chatbubble"></span>
                <div class="mui-media-body">亚洲有码</div></a></li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="#">
                <span class="mui-icon mui-icon-extra mui-icon-extra-class"></span>
                <div class="mui-media-body">欧美无码</div></a></li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="#">
                <span class="mui-icon mui-icon-extra mui-icon-extra-classroom"></span>
                <div class="mui-media-body">里番动漫</div></a></li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="#">
                <span class="mui-icon mui-icon-extra mui-icon-extra-heart-filled"></span>
                <div class="mui-media-body">国产自拍</div></a></li>
        </ul>
    </div>

</template>

<script>
    import { Toast } from 'mint-ui'
    export default {
        name: "home",
        data(){
            return {
                lunboList: []
            }
        },
        created() {
            this.getLubo();
        },
        methods: {
            getLubo(){
                this.$http.get("lunbo").then(result => {
                    console.log(result.body.message)
                    if (result.body.status === 0 ){
                        this.lunboList = result.body.message;
                    }else {
                        Toast("加载轮播图失败！")
                    }
                })
            }
        }
    }
</script>

<style scoped lang="scss">
    .mint-swipe{
        height: 200px;
        .mint-swipe-item{
            &:nth-child(1){
               background-color: #2ac845;
            }
            &:nth-child(2){
                background-color: #007aff;
            }
            &:nth-child(3){
                background-color: #222222;
            }
        }
    }

</style>
